package com.keepers.repair.view.picker.info;

import com.contrarywind.interfaces.IPickerViewData;

import java.util.Objects;

/**
 * auth aboom
 * date 2018/8/29
 */
public class PickerInfo implements IPickerViewData {

    private long    id;
    private String picker;

    public PickerInfo(String picker) {
        this.picker = picker;
    }

    public PickerInfo(long id, String picker) {
        this.id = id;
        this.picker = picker;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PickerInfo that = (PickerInfo) o;
        return Objects.equals(picker, that.picker);
    }

    @Override
    public int hashCode() {
        return Objects.hash(picker);
    }

    @Override
    public String getPickerViewText() {
        return picker;
    }

    public long getId() {
        return id;
    }
}
